﻿using NLog.Layouts;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace SuperX.Common.Log
{
    [Layout("Log4JXmlEventLayout")]
    public class CustomLog4JXmlEventLayout : Log4JXmlEventLayout
    {
        // 
        public CustomLog4JXmlEventLayout()
        {
            try
            {
                PropertyInfo property = typeof(Log4JXmlEventLayout).GetProperty("Renderer");
                if (property != null)
                {
                    property.SetValue(this, new CustomLog4JXmlEventLayoutRenderer(), null);
                }
            }
            catch (Exception)
            {
            }
        }
    }
}
